<template>
	<view class="main">

		<tou_hand1 handtitle='常用添加费率'></tou_hand1>
		<view class="show">
			<view class="sone">
				<input placeholder="输入套餐名字" v-model="packageName" maxlength="50" />
			</view>
			<van-tabs v-model="active" @click="onClick">
				<van-tab title="计量">
					<view class="stap">
						<view class="stapone">
							<view class="staponeleft">
								电量费率：
							</view>
							<input placeholder="元/度" v-model="standard" type="digit" />
							<view class="staponelefts">
								元/度
							</view>
						</view>
						<view class="stapone">
							<view class="staponeleft">
								服务费费率：
							</view>
							<input placeholder="元/小时" v-model="num" type="digit" />
							<view class="staponelefts">
								元/小时
							</view>
						</view>
						<view class="stapone">
							<view class="staponeleft">
								开通服务费套餐：
							</view>
							<van-switch :checked="checkedtap" size="20px" @change="changeCheckedtap" />
						</view>
						<view class="stapone" v-if="checkedtap==true">
							<view class="staponeleft" style="width: 41%;">
								充电订单限制(有效订单)：
							</view>
							<input placeholder="次" v-model="limitNum" type="digit" style="width: 120upx;" />
							<view class="staponelefts" style="display: flex;align-items: center;width: 39%;">
								<span style='width: 70upx;'>次</span>
								<span style='color: #999;'>可同时充电的数量（0表示不限制）</span>
							</view>
						</view>
						<view class="stapone" v-if="checkedtap==true">
							<view class="staponeleft" style="width: 41%;">
							</view>
							<input placeholder="次" v-model="dayNum" type="digit" style="width: 120upx;" />
							<view class="staponelefts" style="display: flex;align-items: center;width: 39%;">
								<span style='width: 70upx;'>次</span>
								<span style='color: #999;'>一天内最大可充电次数（0表示不限制）</span>
							</view>
						</view>
						<view style="width: 100%;display: flex;justify-content: center;" v-if="checkedtap==true">
							<view class="stapsix" @click="addopenservice" v-if="services.length<4">添加档位</view>
							<view class="stapsix" @click="delshowopen" style="border-color: red;color: red;">清空档位</view>
						</view>
						<view class="stapone1" v-for="(item, index) in services" :key="index" v-if="checkedtap==true">
							<view class="stapone1left">
								{{item.days}}天
							</view>
							<view class="stapone1z">
								{{item.rates}}元
							</view>
							<view class="stapone1right" @click="shanbtn(index)" v-if="index==services.length-1">
								删除
							</view>
						</view>
						<view class="stapone" v-if="onetype==2">
							<view class="staponeleft">
								最低消费：
							</view>
							<input v-model="minMoney" type="digit" />
							<view class="staponelefts">
								元
							</view>
						</view>
						<view class="stapone" v-if="onetype==2">
							<view class="staponeleft">
								电损率：
							</view>
							<input v-model="lossRate" type="digit" />
							<view class="staponelefts">
								度
							</view>
						</view>
						<view class="stapone" v-if="onetype==2&&occNum>0">
							<view class="staponeleft">
								占位费封顶金额：
							</view>
							<input v-model="occupyMax" type="digit" />
							<view class="staponelefts">
								元
							</view>
						</view>
						<view class="stapone" v-if="onetype==2&&occNum>0">
							<view class="staponeleft">
								占位费率：
							</view>
							<input v-model="occupyRate" type="digit" />
							<view class="staponelefts">

							</view>
						</view>
						<view class="stapone" v-if="onetype==2&&occNum>0">
							<view class="staponeleft">
								免费时长(小时)：
							</view>
							<input v-model="occupyFree" type="digit" />
							<view class="staponelefts">
								小时
							</view>
						</view>
						<view class="staptwo" v-if="onetype==2">
							<view class="staptwohand">备注：（100字）</view>
							<textarea maxlength='100' v-model="remarks" />
						</view>
						<view class="stapthree">
							<!-- <view class="stapthreeleft">保存</view>
							<view class="stapthreeright">删除</view> -->
							<view class="stapthreezhong" @click="xinzbtn">保存</view>
						</view>
						<view class="stapfour" v-if="onetype==2" @click="onebtn(1)">
							<view class="stapfourhand">
								<image src="https://qiniu.jxyutuo.com/yanqin/tabBarimg//up.png"></image>
							</view>
							<view class="stapfourfoot">收起更多选填参数</view>
						</view>
						<view class="stapfour" @click="onebtn(2)" v-if="onetype==1">
							<view class="stapfourfoot">展开更多选填参数</view>
							<view class="stapfourhand">
								<image src="https://qiniu.jxyutuo.com/yanqin/tabBarimg//down.png"></image>
							</view>
						</view>
						<view class="stapfive" v-if="onetype==2">
							<view class="stapfivehand">说明:</view>
							<view class="stapfivefoot">
								最低消费:填0表示不设最低消费;<br />
								电损:适当向用户收取设备的电量损耗，填0.01-1之间的小数; 填0表示不设电损:</br>
								备注:可以在"用户扫码-查看费率"中显示，100字以内;
							</view>
						</view>
					</view>
				</van-tab>
				<van-tab title="计量2">
					<view style="text-align: center;font-size: 24upx;font-weight: 700;margin-top: 20upx;">
						该计量模式下，服务费单位为元/度</view>
					<view class="stap">
						<view class="stapone">
							<view class="staponeleft">
								电量费率：
							</view>
							<input placeholder="元/度" v-model="standard" type="digit" />
							<view class="staponelefts">
								元/度
							</view>
						</view>
						<view class="stapone">
							<view class="staponeleft">
								服务费费率：
							</view>
							<input placeholder="元/度" v-model="num" type="digit" />
							<view class="staponelefts">
								元/度
							</view>
						</view>
						<view class="stapone">
							<view class="staponeleft">
								开通服务费套餐：
							</view>
							<van-switch v-model="checkedtap" size="20px" />
						</view>
						<view class="stapone" v-if="checkedtap==true">
							<view class="staponeleft" style="width: 41%;">
								充电订单限制(有效订单)：
							</view>
							<input placeholder="次" v-model="limitNum" type="digit" style="width: 120upx;" />
							<view class="staponelefts" style="display: flex;align-items: center;width: 39%;">
								<span style='width: 70upx;'>次</span>
								<span style='color: #999;'>可同时充电的数量（0表示不限制）</span>
							</view>
						</view>
						<view class="stapone" v-if="checkedtap==true">
							<view class="staponeleft" style="width: 41%;">
							</view>
							<input placeholder="次" v-model="dayNum" type="digit" style="width: 120upx;" />
							<view class="staponelefts" style="display: flex;align-items: center;width: 39%;">
								<span style='width: 70upx;'>次</span>
								<span style='color: #999;'>一天内最大可充电次数（0表示不限制）</span>
							</view>
						</view>
						<view style="width: 100%;display: flex;justify-content: center;" v-if="checkedtap==true">
							<view class="stapsix" @click="addopenservice" v-if="services.length<4">添加档位</view>
							<view class="stapsix" @click="delshowopen" style="border-color: red;color: red;">清空档位</view>
						</view>
						<view class="stapone1" v-for="(item, index) in services" :key="index" v-if="checkedtap==true">
							<view class="stapone1left">
								{{item.days}}天
							</view>
							<view class="stapone1z">
								{{item.rates}}元
							</view>
							<view class="stapone1right" @click="shanbtn(index)" v-if="index==services.length-1">
								删除
							</view>
						</view>
						<view class="stapone" v-if="onetype==2">
							<view class="staponeleft">
								最低消费：
							</view>
							<input v-model="minMoney" type="digit" />
							<view class="staponelefts">
								元
							</view>
						</view>
						<view class="stapone" v-if="onetype==2">
							<view class="staponeleft">
								电损率：
							</view>
							<input v-model="lossRate" type="digit" />
							<view class="staponelefts">
								度
							</view>
						</view>
						<view class="stapone" v-if="onetype==2&&occNum>0">
							<view class="staponeleft">
								占位费封顶金额：
							</view>
							<input v-model="occupyMax" type="digit" />
							<view class="staponelefts">
								元
							</view>
						</view>
						<view class="stapone" v-if="onetype==2&&occNum>0">
							<view class="staponeleft">
								占位费率：
							</view>
							<input v-model="occupyRate" type="digit" />
							<view class="staponelefts">

							</view>
						</view>
						<view class="stapone" v-if="onetype==2&&occNum>0">
							<view class="staponeleft">
								免费时长(小时)：
							</view>
							<input v-model="occupyFree" type="digit" />
							<view class="staponelefts">
								小时
							</view>
						</view>
						<view class="staptwo" v-if="onetype==2">
							<view class="staptwohand">备注：（100字）</view>
							<textarea maxlength='100' v-model="remarks" />
						</view>
						<view class="stapthree">
							<!-- <view class="stapthreeleft">保存</view>
							<view class="stapthreeright">删除</view> -->
							<view class="stapthreezhong" @click="xinzbtn">保存</view>
						</view>
						<view class="stapfour" v-if="onetype==2" @click="onebtn(1)">
							<view class="stapfourhand">
								<image src="https://qiniu.jxyutuo.com/yanqin/tabBarimg//up.png"></image>
							</view>
							<view class="stapfourfoot">收起更多选填参数</view>
						</view>
						<view class="stapfour" @click="onebtn(2)" v-if="onetype==1">
							<view class="stapfourfoot">展开更多选填参数</view>
							<view class="stapfourhand">
								<image src="https://qiniu.jxyutuo.com/yanqin/tabBarimg//down.png"></image>
							</view>
						</view>
						<view class="stapfive" v-if="onetype==2">
							<view class="stapfivehand">说明:</view>
							<view class="stapfivefoot">
								最低消费:填0表示不设最低消费;<br />
								电损:适当向用户收取设备的电量损耗，填0.01-1之间的小数; 填0表示不设电损:</br>
								备注:可以在"用户扫码-查看费率"中显示，100字以内;
							</view>
						</view>
					</view>
				</van-tab>
				<van-tab title="计时">
					<view class="stap">
						<view style="width: 100%;display: flex;justify-content: center;">
							<view class="stapsix" @click="addshowopen">添加档位</view>
							<view class="stapsix" @click="delshowopen" style="border-color: red;color: red;">清空档位</view>
						</view>
						<view class="stapone1" v-for="(item, index) in twolist" :key="index">
							<view class="stapone1left">
								{{item.left}}-{{item.right}}瓦：
							</view>
							<view class="stapone1z">
								{{item.money}}元/小时
							</view>
							<view class="stapone1right" @click="shanbtn(index)" v-if="index==twolist.length-1">
								删除
							</view>
						</view>

						<view class="stapseven1">
							<view class="stapsevenleft">{{smoney}}瓦以上：</view>
							<input v-model="twohat" type="digit" placeholder="元/时" />
							<view class="stapsevenleft1">元/时</view>
						</view>
						<view class="stapone" style="margin-top: 0rpx;margin: 32rpx 0;width: 87%;">
							<view class="staponeleft" style="width: 38%;margin-top: 0rpx;">
								计费单位（分钟）：[1-60且必须为整数]
							</view>
							<input v-model="jscharging" type="number" v-input-limit='0'>
						</view>
						<view class="stapseven" v-if="twotype==2">
							<view class="stapsevenleft">最低消费：</view>
							<input v-model="minMoney" type="digit" />
							<view class="stapsevenleft1">元</view>
						</view>
						<view class="stapone" v-if="twotype==2&&occNum>0">
							<view class="staponeleft">
								占位费封顶金额：
							</view>
							<input v-model="occupyMax" type="digit" />
							<view class="staponelefts">
								元
							</view>
						</view>
						<view class="stapone" v-if="twotype==2&&occNum>0">
							<view class="staponeleft">
								占位费率：
							</view>
							<input v-model="occupyRate" type="digit" />
							<view class="staponelefts">

							</view>
						</view>
						<view class="stapone" v-if="twotype==2&&occNum>0">
							<view class="staponeleft">
								免费时长(小时)：
							</view>
							<input v-model="occupyFree" type="digit" />
							<view class="staponelefts">
								小时
							</view>
						</view>
						<view class="staptwo" v-if="twotype==2">
							<view class="staptwohand">备注：（100字）</view>
							<textarea maxlength='100' v-model="remarks" />
						</view>
						<view class="stapthree">
							<!-- <view class="stapthreeleft">保存</view>
							<view class="stapthreeright">删除</view> -->
							<view class="stapthreezhong" @click="xinzbtn">保存</view>
						</view>
						<view class="stapfour" v-if="twotype==2" @click="twobtn(1)">
							<view class="stapfourhand">
								<image src="https://qiniu.jxyutuo.com/yanqin/tabBarimg//up.png"></image>
							</view>
							<view class="stapfourfoot">收起更多选填参数</view>
						</view>
						<view class="stapfour" @click="twobtn(2)" v-if="twotype==1">
							<view class="stapfourfoot">展开更多选填参数</view>
							<view class="stapfourhand">
								<image src="https://qiniu.jxyutuo.com/yanqin/tabBarimg//down.png"></image>
							</view>
						</view>
						<view class="stapfive" v-if="twotype==2">
							<view class="stapfivehand">说明:</view>
							<view class="stapfivefoot">
								最低消费:填0表示不设最低消费;<br />
								电损:适当向用户收取设备的电量损耗，填0.01-1之间的小数; 填0表示不设电损:</br>
								备注:可以在"用户扫码-查看费率"中显示，100字以内;<br />
								<span style='color: red;'>
									计费单位：以充电时长62分钟为例：<br />
									1、如计费单位使用默认的30分钟，则按用户充电90分钟结算；<br />
									1、如设置计费单位为60分钟，则按用户充电120分钟结算；<br />
									2、如设置计费单位为20分钟，则按用户充电80分钟结算；<br />
									备注：为了减少纠纷，系统有一个一分钟的缓冲区，超过计费单位1分钟以内的将会被忽略。
								</span>
							</view>
						</view>
					</view>
				</van-tab>
				<van-tab title="计次">
					<view class="stap">
						<view style="width: 100%;display: flex;justify-content: center;">
							<view class="stapsix" @click="addshowopen">添加档位</view>
							<view class="stapsix" @click="delshowopen" style="border-color: red;color: red;">清空档位</view>
						</view>
						<view class="stapone1" v-for="(item, index) in threelist" :key="index">
							<view class="stapone1left">
								{{item.left}}-{{item.right}}瓦：
							</view>
							<view class="stapone1z">
								{{item.money}}元/次
							</view>
							<view class="stapone1right" @click="shanbtn(index)" v-if="index==threelist.length-1">
								删除
							</view>
						</view>
						<view class="stapseven1">
							<view class="stapsevenleft">{{smoney1}}瓦以上：</view>
							<input v-model="threehat" type="digit" placeholder="元/次" />
							<view class="stapsevenleft1">元/次</view>
						</view>

						<view class="stapseven" v-if="threetype==2">
							<view class="stapsevenleft">最低消费：</view>
							<input v-model="minMoney" type="digit" />
						</view>
						<view class="stapone" v-if="threetype==2&&occNum>0">
							<view class="staponeleft">
								占位费封顶金额：
							</view>
							<input v-model="occupyMax" type="digit" />
							<view class="staponelefts">
								元
							</view>
						</view>
						<view class="stapone" v-if="threetype==2&&occNum>0">
							<view class="staponeleft">
								占位费率：
							</view>
							<input v-model="occupyRate" type="digit" />
							<view class="staponelefts">

							</view>
						</view>
						<view class="stapone" v-if="threetype==2&&occNum>0">
							<view class="staponeleft">
								免费时长(小时)：
							</view>
							<input v-model="occupyFree" type="digit" />
							<view class="staponelefts">
								小时
							</view>
						</view>
						<view class="staptwo" v-if="threetype==2">
							<view class="staptwohand">备注：（100字）</view>
							<textarea maxlength='100' v-model="remarks" />
						</view>
						<view class="stapthree">
							<!-- <view class="stapthreeleft">保存</view>
							<view class="stapthreeright">删除</view> -->
							<view class="stapthreezhong" @click="xinzbtn">保存</view>
						</view>
						<view class="stapfour" v-if="threetype==2" @click="threebtn(1)">
							<view class="stapfourhand">
								<image src="https://qiniu.jxyutuo.com/yanqin/tabBarimg//up.png"></image>
							</view>
							<view class="stapfourfoot">收起更多选填参数</view>
						</view>
						<view class="stapfour" @click="threebtn(2)" v-if="threetype==1">
							<view class="stapfourfoot">展开更多选填参数</view>
							<view class="stapfourhand">
								<image src="https://qiniu.jxyutuo.com/yanqin/tabBarimg//down.png"></image>
							</view>
						</view>
						<view class="stapfive" v-if="threetype==2">
							<view class="stapfivehand">说明:</view>
							<view class="stapfivefoot">
								最低消费:填0表示不设最低消费;<br />
								电损:适当向用户收取设备的电量损耗，填0.01-1之间的小数; 填0表示不设电损:</br>
								备注:可以在"用户扫码-查看费率"中显示，100字以内;
							</view>
						</view>
					</view>

				</van-tab>
				<van-tab title="一元套餐">
					<view class="showtap">


						<view class="mont">
							<view class="monthand">
								金额设置:
							</view>
							<view class="montap">
								<view>
									<view class="mtwo"><input placeholder="如：2元" v-model="first" type="digit"
											v-input-limit='0' maxlength="6" /><span class="mtwotxt">元</span></view>
									<view class="mtwo"><span class="mtwotxt"
											style='margin-right: 10upx;margin-left: 0upx;margin-top:0upx'>优惠率:</span><input
											v-model="disFirst" type="digit" v-input-limit='2' maxlength="4"
											style="width: 156upx;margin-top:20upx;margin-bottom:20upx" /></view>
								</view>
								<view>
									<view class="mtwo"><input placeholder="如：4元" v-model="second" type="digit"
											v-input-limit='0' maxlength="6" /><span class="mtwotxt">元</span></view>
									<view class="mtwo"><span class="mtwotxt"
											style='margin-right: 10upx;margin-left: 0upx;margin-top:0upx'>优惠率:</span><input
											v-model="disSecond" type="digit" v-input-limit='2' maxlength="4"
											style="width: 156upx;margin-top:20upx;margin-bottom:20upx" /></view>
								</view>

								<view>
									<view class="mtwo"><input placeholder="如：6元" v-model="third" type="digit"
											v-input-limit='0' maxlength="6" /><span class="mtwotxt">元</span></view>
									<view class="mtwo"><span class="mtwotxt"
											style='margin-right: 10upx;margin-left: 0upx;margin-top:0upx'>优惠率:</span><input
											v-model="disThird" type="digit" v-input-limit='2' maxlength="4"
											style="width: 156upx;margin-top:20upx;margin-bottom:20upx" /></view>
								</view>

								<view>
									<view class="mtwo"><input placeholder="如：8元" v-model="fourth" type="digit"
											v-input-limit='0' maxlength="6" /><span class="mtwotxt">元</span></view>
									<view class="mtwo"><span class="mtwotxt"
											style='margin-right: 10upx;margin-left: 0upx;margin-top:0upx'>优惠率:</span><input
											v-model="disFourth" type="digit" v-input-limit='2' maxlength="4"
											style="width: 156upx;margin-top:20upx;margin-bottom:20upx" /></view>
								</view>

							</view>
							<view class="monthand" style="color: red;font-size: 26upx;padding:30upx 40upx ;">
								优惠率：填值范围0-1，最多2位小数。此优惠为延长用户的充电时间;如费率配置为：0瓦 以上 1小时，优惠率0.5，用户选择充2元，则用户可充电时长为3小时；
							</view>
						</view>
						<view class="stap">
							<view class="staptxt">计时：</view>
							<view class="stapsix" @click="yyshowopen">添加档位</view>
							<view class="stapone1" v-for="(item, index) in fourlist" :key="index">
								<view class="stapone1left">
									{{item.left}}-{{item.right}}瓦：
								</view>
								<view class="stapone1z">
									1元/{{item.money}}小时
								</view>
								<view class="stapone1right" @click="shanbtn(index)" v-if="index==fourlist.length-1">
									删除
								</view>
							</view>
							<view class="stapseven1">
								<view class="stapsevenleft">{{smoney2}}瓦以上：</view>
								1元 /<input v-model="fourhat" type="digit" placeholder="小时"
									style="width: 320upx; margin-left: 15upx;" />
								<view class="stapsevenleft1">小时</view>
							</view>
							<view class="stapone" style="margin-top: 0rpx;margin: 32rpx 0;width: 87%;">
								<view class="staponeleft" style="width: 38%;margin-top: 0rpx;">
									计费单位（分钟）：[1-60且必须为整数]
								</view>
								<input v-model="onecharging" type="number" v-input-limit='0'>
							</view>

							<view class="sfant" v-if="fourtype==2">
								<van-checkbox v-model="checked" shape="square">允许退费</van-checkbox>
							</view>
							<view class="sfant" v-if="fourtype==2">
								<van-checkbox v-model="Stopchecked" shape="square">允许充满自停</van-checkbox>
							</view>
							<view class="stapseven" v-if="fourtype==2&&checked">
								<view class="stapsevenleft">最低消费：</view>
								<input v-model="minMoney" type="digit" />
								<view class="stapsevenleft1">元</view>
							</view>
							<view class="stapone" v-if="fourtype==2&&occNum>0">
								<view class="staponeleft">
									占位费封顶金额：
								</view>
								<input v-model="occupyMax" type="digit" />
								<view class="staponelefts">
									元
								</view>
							</view>
							<view class="stapone" v-if="fourtype==2&&occNum>0">
								<view class="staponeleft">
									占位费率：
								</view>
								<input v-model="occupyRate" type="digit" />
								<view class="staponelefts">

								</view>
							</view>
							<view class="stapone" v-if="fourtype==2&&occNum>0">
								<view class="staponeleft">
									免费时长(小时)：
								</view>
								<input v-model="occupyFree" type="digit" />
								<view class="staponelefts">
									小时
								</view>
							</view>
							<view class="staptwo" v-if="fourtype==2">
								<view class="staptwohand">备注：（100字）</view>
								<textarea maxlength='100' v-model="remarks" />
							</view>
							<view class="stapthree">
								<!-- <view class="stapthreeleft">保存</view>
								<view class="stapthreeright">删除</view> -->
								<view class="stapthreezhong" @click="xinzbtn">保存</view>
							</view>
							<view class="stapfour" v-if="fourtype==2" @click="fourbtn(1)">
								<view class="stapfourhand">
									<image src="https://qiniu.jxyutuo.com/yanqin/tabBarimg//up.png"></image>
								</view>
								<view class="stapfourfoot">收起更多选填参数</view>
							</view>
							<view class="stapfour" @click="fourbtn(2)" v-if="fourtype==1">
								<view class="stapfourfoot">展开更多选填参数</view>
								<view class="stapfourhand">
									<image src="https://qiniu.jxyutuo.com/yanqin/tabBarimg//down.png"></image>
								</view>
							</view>
							<view class="stapfive" v-if="fourtype==2">
								<view class="stapfivehand">说明:</view>
								<view class="stapfivefoot">
									<!-- 最低消费:填0表示不设最低消费;<br/>
									电损:适当向用户收取设备的电量损耗，填0.01-1之间的小数; 填0表示不设电损:</br> -->
									备注:可以在"用户扫码-查看费率"中显示，100字以内;<br />
									<span style='color: red;'>
										计费单位：以充电时长62分钟为例：<br />
										1、如计费单位使用默认的30分钟，则按用户充电90分钟结算；<br />
										1、如设置计费单位为60分钟，则按用户充电120分钟结算；<br />
										2、如设置计费单位为20分钟，则按用户充电80分钟结算；<br />
										备注：为了减少纠纷，系统有一个一分钟的缓冲区，超过计费单位1分钟以内的将会被忽略。
									</span>
								</view>
							</view>
						</view>

					</view>
				</van-tab>

			</van-tabs>
		</view>
		<!-- //新增档位弹窗 -->
		<van-popup :show="addshow">
			<view class="tan">
				<view class="tanhand">添加档位</view>
				<view class="tanone">
					<span class="tantxt">{{onevul}}瓦</span>
					<view class="tanonetap"></view>
					<input v-model="twovul" type="digit" /><span class="tantxt">瓦</span>
				</view>
				<view class="tantwo">
					<input placeholder="金额" v-model="moneyvul" type="digit" /><span class="tantxt">元</span>
				</view>
				<view class="tanbtn">
					<view class="tanbtnleft" @click="addshowclose">取消</view>
					<view class="tanbtnright" @click="addbtn">保存</view>
				</view>
			</view>
		</van-popup>
		<!-- //新增服务费弹窗  -->
		<van-popup :show="addservices">
			<view class="tan">
				<view class="tanhand">添加档位</view>
				<view class="tanone">
					<input v-model="avul" type="digit" /><span class="tantxt">天</span>
					<view class="tanonetap"></view>
					<input v-model="bvul" type="digit" /><span class="tantxt">元</span>
				</view>
				<view class="tanbtn">
					<view class="tanbtnleft" @click="mclose">取消</view>
					<view class="tanbtnright" @click="mbtn">保存</view>
				</view>
			</view>
		</van-popup>
		<!-- //一元新增档位弹窗 -->
		<van-popup :show="yiyuanshow">
			<view class="tan">
				<view class="tanhand">添加档位</view>
				<view class="tanone">
					<span class="tantxt">{{yyonevul}}瓦</span>
					<view class="tanonetap"></view>
					<input v-model="yytwovul" type="digit" /><span class="tantxt">瓦</span>
				</view>
				<view class="tantwo" style="width: 300upx;">
					<span class="tantxt" style='margin-left: 0upx;margin-right: 10upx;'>1元/</span><input
						placeholder="时长" v-model="yyvul" type="digit" /><span class="tantxt">小时</span>
				</view>
				<view class="tanbtn">
					<view class="tanbtnleft" @click="yiyuanclose">取消</view>
					<view class="tanbtnright" @click="yyaddbtn">保存</view>
				</view>
			</view>
		</van-popup>
	</view>
</template>

<script>
	import tou_hand1 from '../../components/tou_hand1/tou_hand1.vue'
	import {
		section
	} from "../../common/section.js"
	// import { Dialog } from 'vant';
	export default {
		components: {
			tou_hand1
		},
		mounted() {

		},

		data() {
			return {
				active: '',
				twolist: [],
				threelist: [],
				fourlist: [{
					'left': 0,
					'right': 140,
					'money': 4
				}, {
					'left': 141,
					'right': 280,
					'money': 3
				}, {
					'left': 281,
					'right': 400,
					'money': 2.5
				}],
				projectId: "", //小区ID
				onetype: 1,
				twotype: 1,
				threetype: 1,
				fourtype: 1,
				addshow: false, //新增档位弹窗
				onevul: '0', //弹窗第一个值
				twovul: '', //弹窗第二个值
				moneyvul: '', //弹窗金额
				yyonevul: '', //一元弹窗第一个值
				yytwovul: '', //一元弹窗第一个值
				yyvul: '', //一元弹窗时长
				smoney: 0, //多少瓦以上
				smoney1: 0, //多少瓦以上
				smoney2: 0, //多少瓦以上
				packageName: '', //套餐名
				type: 'B2', //计费类型（A包月【A1包时，A3包次】，B常用模式【B1计时，B2计量，B3计次，B5计量2】, C临时【C1临时计时】）
				standard: '', //计费金额
				num: 0, //服务费费率
				minMoney: 0, //最低消费
				lossRate: 0, //电损率
				remarks: '', //备注
				twohat: '',
				threehat: '',
				fourhat: 2,
				packageName: '', //套餐名
				first: '', //临时金额1
				second: '', //临时金额2
				third: '', //临时金额3
				fourth: '', //临时金额4
				remarks: '', //备注
				checked: false,
				yiyuanshow: false, //一元弹窗展示
				disFirst: 0, //一元第一档费率
				disSecond: 0, //一元第二档费率
				disThird: 0, //一元第三档费率
				disFourth: 0, //一元第三档费率
				occupyMax: 0, //占位费封顶金额（充电柜）
				occupyRate: 0.3, //占位费率（充电柜）
				occupyFree: 2, //免费时长（充电柜）-小时
				occNum: 0, //充电柜充电区数量
				Stopchecked: false, //是否允许充满自停
				jscharging: 30, //计时计费
				onecharging: 30, //一元计费
				checkedtap: false, //服务费套餐
				services: [], //服务费套餐列表
				addservices: false, //服务费套餐添加
				avul: 0, //服务费套餐天数
				bvul: 0, //服务费套餐金额
				dayNum: 0, //一天内最多可充次数
				limitNum: 0, //允许同时充电最大次数

			}
		},
		onLoad(options) {
			this.projectId = options.projectId;
			this.occNum = options.occNum
		},
		methods: {
			changeCheckedtap(){
				this.checkedtap = !this.checkedtap
			},
			onebtn(vul) {
				this.onetype = vul
			},
			twobtn(vul) {
				this.twotype = vul
			},
			threebtn(vul) {
				this.threetype = vul
			},
			fourbtn(vul) {
				this.fourtype = vul
			},
			//关闭新增档位弹窗
			addshowclose() {

				// this.onevul='',
				this.twovul = '',
					this.moneyvul = ''
				this.addshow = false
			},
			mclose() {
				this.avul = '',
					this.bvul = ''
				this.addservices = false
			},
			//关闭新增一元档位弹窗
			yiyuanclose() {
				this.yytwovul = '',
					this.yyvul = ''
				this.yiyuanshow = false
			},
			addopenservice() {
				this.addservices = true
				if (this.services.length > 0) {
					this.avul = Number(this.services[this.services.length - 1].days) + 1

				} else {
					this.avul = '0'
				}
			},
			//打开新增档位弹窗
			addshowopen() {
				if (this.active == 2) {
					if (this.twolist.length > 0) {
						this.onevul = Number(this.twolist[this.twolist.length - 1].right) + 1

					} else {
						this.onevul = '0'
					}
				} else if (this.active == 3) {
					if (this.threelist.length > 0) {
						this.onevul = Number(this.threelist[this.threelist.length - 1].right) + 1

					} else {
						this.onevul = '0'
					}
				}


				this.addshow = true
			},
			//清空档位
			delshowopen() {
				if (this.active == 2) {
					this.twolist = []
					this.onevul = '0'
					this.smoney = '0'
					this.twohat = 0

				} else if (this.active == 3) {
					this.threelist = []
					this.onevul = '0'
					this.smoney1 = '0'
					this.threehat = 0

				} else if (this.active == 0) {
					this.services = []
				} else if (this.active == 1) {
					this.services = []
				}
			},
			yyshowopen() {
				if (this.fourlist.length > 0) {
					this.yyonevul = Number(this.fourlist[this.fourlist.length - 1].right) + 1

				} else {
					this.yyonevul = '0'
				}
				this.yiyuanshow = true
			},
			//新增
			addbtn() {
				let that = this;
				if (!that.onevul || !that.twovul || !that.moneyvul) {
					uni.showToast({
						title: '请完善信息',
						duration: 2000,
						icon: 'none'
					});
					return
				}
				if (that.onevul > that.twovul || that.onevul == that.twovul) {
					uni.showToast({
						title: '第一档不能小于或等于第二档',
						duration: 2000,
						icon: 'none'
					});
					return
				}
				if (that.active == 2) {
					if (Number(that.moneyvul) < 0 || Number(that.moneyvul) > 5) {
						uni.showToast({
							title: '金额应在0~5元之间',
							duration: 2000,
							icon: 'none'
						});
						return
					}
				} else if (that.active == 3) {
					if (Number(that.moneyvul) < 0 || Number(that.moneyvul) > 20) {
						uni.showToast({
							title: '金额应在0~20元之间',
							duration: 2000,
							icon: 'none'
						});
						return
					}
				}
				if (section(that.moneyvul) == true) {
					uni.showModal({
					    title: '提示',
					    content: '系统检测到有非正常范围内（正常为0.2-3元）的费率金额，点击“取消”进行检查，点击“确认”继续操作！',
					    success: (res2)=> {
					        if (res2.confirm) {
					            var arr = {
					            	left: that.onevul,
					            	right: that.twovul,
					            	money: that.moneyvul
					            }
					            if (that.active == 2) {
					            	that.twolist.push(arr)
					            	that.smoney = Number(that.twolist[that.twolist.length - 1].right) + 1
					            } else if (that.active == 3) {
					            	that.threelist.push(arr)
					            	that.smoney1 = Number(that.threelist[that.threelist.length - 1].right) + 1
					            }
					            
					            that.addshowclose();
					        } else if (res2.cancel) {
					            console.log('用户点击取消');
					        }
					    }
					});

				} else {
					var arr = {
						left: that.onevul,
						right: that.twovul,
						money: that.moneyvul
					}
					if (that.active == 2) {
						that.twolist.push(arr)
						that.smoney = Number(that.twolist[that.twolist.length - 1].right) + 1
					} else if (that.active == 3) {
						that.threelist.push(arr)
						that.smoney1 = Number(that.threelist[that.threelist.length - 1].right) + 1
					}

					that.addshowclose();
				}

			},
			//一元新增
			yyaddbtn() {
				if (!this.yyonevul || !this.yytwovul || !this.yyvul) {
					uni.showToast({
						title: '请完善信息',
						duration: 2000,
						icon: 'none'
					});
					return
				}
				if (this.yyonevul > this.yytwovul || this.yyonevul == this.yytwovul) {
					uni.showToast({
						title: '第一档不能小于或等于第二档',
						duration: 2000,
						icon: 'none'
					});
					return
				}

				var arr = {
					left: this.yyonevul,
					right: this.yytwovul,
					money: this.yyvul
				}
				this.fourlist.push(arr)
				this.smoney2 = Number(this.fourlist[this.fourlist.length - 1].right) + 1
				this.yiyuanclose();


			},
			mbtn() {
				if (!this.avul || !this.bvul || this.avul == 0 || this.bvul == 0) {
					uni.showToast({
						title: '请完善信息',
						duration: 2000,
						icon: 'none'
					});
					return
				}
				if (this.avul < 0 || this.bvul < 0) {
					uni.showToast({
						title: '请输入整数',
						duration: 2000,
						icon: 'none'
					});
					return
				}
				if (this.avul > 365) {
					uni.showToast({
						title: '天数不能大于365',
						duration: 2000,
						icon: 'none'
					});
					return
				}
				let maxmoney = this.avul * 3
				if (this.bvul > maxmoney) {
					uni.showToast({
						title: '金额不能大于' + maxmoney,
						duration: 2000,
						icon: 'none'
					});
					return
				}
				var arr = {
					days: this.avul,
					rates: this.bvul
				}
				this.services.push(arr)
				this.mclose()
			},
			//删除
			shanbtn(vul) {
				if (this.active == 2) {
					this.twolist.splice(vul, 1)
					if (this.twolist.length > 0) {
						this.smoney = Number(this.twolist[this.twolist.length - 1].right) + 1

					} else {
						this.smoney = '0'
					}
				} else if (this.active == 3) {
					this.threelist.splice(vul, 1)
					if (this.threelist.length > 0) {
						this.smoney1 = Number(this.threelist[this.threelist.length - 1].right) + 1

					} else {
						this.smoney1 = '0'
					}
				} else if (this.active == 4) {
					this.fourlist.splice(vul, 1)
					if (this.fourlist.length > 0) {
						this.smoney2 = Number(this.fourlist[this.fourlist.length - 1].right) + 1

					} else {
						this.smoney2 = '0'
					}
				} else if (this.active == 0) {
					this.services.splice(vul, 1)
				} else if (this.active == 1) {
					this.services.splice(vul, 1)
				}
			},
			onClick() {
				this.packageName = ''
				this.minMoney = 0
				this.occupyMax = 0
				this.occupyRate = 0.3
				this.occupyFree = 2
				this.lossRate = 0
				this.remarks = ''
				this.twolist = []
				this.threelist = []
				this.foutlist = [{
					'left': 0,
					'right': 140,
					'money': 4
				}, {
					'left': 141,
					'right': 280,
					'money': 3
				}, {
					'left': 281,
					'right': 400,
					'money': 2.5
				}]
				this.standard = 0
				this.num = ''
				this.twohat = ''
				this.smoney = 0
				this.smoney1 = 0
				this.smoney2 = Number(this.fourlist[this.fourlist.length - 1].right) + 1
				this.threehat = ''
				this.fourhat = 2
				this.disFirst = 0
				this.disSecond = 0
				this.disThird = 0
				this.disFourth = 0
			},
			//添加一个费率
			xinzbtn() {
				let data = {}
				if (Number(this.occupyMax) > 9999) {
					uni.showToast({
						title: '占位费上限9999元',
						duration: 2000,
						icon: 'none'
					});
					return
				}
				if (this.active == 0) {
					let arr = []
					let map = {}
					map['standard'] = this.standard
					map['num'] = Number(this.num)
					arr.push(map)
					if (!this.packageName) {
						uni.showToast({
							title: '套餐名不能为空',
							duration: 2000,
							icon: 'none'
						});
						return;
					}
					if (!this.standard.toString()) {
						uni.showToast({
							title: '套餐金额不能为空',
							duration: 2000,
							icon: 'none'
						});
						return
					}
					if (this.num < 0 || this.num > 3) {
						uni.showToast({
							title: '服务费费率应在0-3之间',
							duration: 2000,
							icon: 'none'
						});
						return
					}
					if (Number(this.standard) < 0 || Number(this.standard) > 3) {
						uni.showToast({
							title: '套餐金额应在0-3之间',
							duration: 2000,
							icon: 'none'
						});
						return
					}
					if (this.limitNum > 10) {
						uni.showToast({
							title: '同时充电最大数量不能大于10',
							duration: 2000,
							icon: 'none'
						});
						return
					}
					if (this.dayNum > 10) {
						uni.showToast({
							title: '一天内最多可充次数不能大于10',
							duration: 2000,
							icon: 'none'
						});
						return
					}
					data = {
						packageName: this.packageName,
						type: 'B2',
						minMoney: this.minMoney,
						occupyMax: this.occupyMax,
						occupyRate: this.occupyRate,
						occupyFree: this.occupyFree,
						lossRate: this.lossRate,
						isFund: 0,
						isAutoStop: 0,
						steps: arr,
						remarks: this.remarks,
						services: this.services,
						limitNum: this.limitNum,
						dayNum: this.dayNum,
						defaultAutoStop: 0
					}

				} else if (this.active == 1) {
					let arr = []
					let map = {}
					map['standard'] = this.standard
					map['num'] = Number(this.num)
					arr.push(map)
					if (!this.packageName) {
						uni.showToast({
							title: '套餐名不能为空',
							duration: 2000,
							icon: 'none'
						});
						return;
					}
					if (!this.standard.toString()) {
						uni.showToast({
							title: '套餐金额不能为空',
							duration: 2000,
							icon: 'none'
						});
						return
					}
					if (this.num < 0 || this.num > 3) {
						uni.showToast({
							title: '服务费费率应在0-3之间',
							duration: 2000,
							icon: 'none'
						});
						return
					}
					if (Number(this.standard) < 0 || Number(this.standard) > 3) {
						uni.showToast({
							title: '套餐金额应在0-3之间',
							duration: 2000,
							icon: 'none'
						});
						return
					}
					if (this.limitNum > 10) {
						uni.showToast({
							title: '同时充电最大数量不能大于10',
							duration: 2000,
							icon: 'none'
						});
						return
					}
					if (this.dayNum > 10) {
						uni.showToast({
							title: '一天内最多可充次数不能大于10',
							duration: 2000,
							icon: 'none'
						});
						return
					}
					data = {
						packageName: this.packageName,
						type: 'B5',
						minMoney: this.minMoney,
						occupyMax: this.occupyMax,
						occupyRate: this.occupyRate,
						occupyFree: this.occupyFree,
						lossRate: this.lossRate,
						isFund: 0,
						isAutoStop: 0,
						steps: arr,
						remarks: this.remarks,
						services: this.services,
						limitNum: this.limitNum,
						dayNum: this.dayNum,
						defaultAutoStop: 0
					}

				} else if (this.active == 2) {
					let arr = []
					if (!this.packageName) {
						uni.showToast({
							title: '套餐名不能为空',
							duration: 2000,
							icon: 'none'
						});
						return;
					}
					if (this.twolist.length > 0) {
						this.twolist.map((item, index, array) => {
							arr.push({
								'minPower': Number(item.left),
								'maxPower': Number(item.right),
								'standard': Number(item.money)
							})
						})

						var map1 = {}
						map1['minPower'] = this.smoney
						map1['maxPower'] = this.smoney
						map1['standard'] = Number(this.twohat)
						arr.push(map1)

					} else {
						var map1 = {}
						map1['minPower'] = this.smoney
						map1['maxPower'] = this.smoney
						map1['standard'] = Number(this.twohat)
						arr.push(map1)
					}
					if (!this.twohat.toString()) {
						uni.showToast({
							title: '套餐金额不能为空',
							duration: 2000,
							icon: 'none'
						});
						return;
					}
					if (Number(this.twohat) > 5 || Number(this.twohat) < 0) {
						uni.showToast({
							title: '套餐金额应在0~5元之间',
							duration: 2000,
							icon: 'none'
						});
						return;
					}
					if (this.jscharging == 0 || this.jscharging > 60) {
						uni.showToast({
							title: '计费单位范围在1到60之间(包含60)',
							duration: 2000,
							icon: 'none'
						});
						return;
					}
					data = {
						packageName: this.packageName,
						type: 'B1',
						minMoney: this.minMoney,
						occupyMax: this.occupyMax,
						occupyRate: this.occupyRate,
						occupyFree: this.occupyFree,
						isFund: 0,
						isAutoStop: 0,
						steps: arr,
						remarks: this.remarks,
						lossRate: 0,
						minutes: this.jscharging,
						defaultAutoStop: 0
					}
				} else if (this.active == 3) {
					let arr = []
					if (this.threelist.length > 0) {
						this.threelist.map((item, index, array) => {
							arr.push({
								'minPower': Number(item.left),
								'maxPower': Number(item.right),
								'standard': Number(item.money)
							})
						})

						var map2 = {}
						map2['minPower'] = this.smoney1
						map2['maxPower'] = this.smoney1
						map2['standard'] = Number(this.threehat)
						arr.push(map2)

					} else {
						var map2 = {}
						map2['minPower'] = this.smoney1
						map2['maxPower'] = this.smoney1
						map2['standard'] = Number(this.threehat)
						arr.push(map2)
					}
					if (!this.threehat.toString()) {
						uni.showToast({
							title: '套餐金额不能为空',
							duration: 2000,
							icon: 'none'
						});
						return;
					}
					if (Number(this.threehat) > 20 || Number(this.threehat) < 0) {
						uni.showToast({
							title: '套餐金额应在0~20元之间',
							duration: 2000,
							icon: 'none'
						});
						return;
					}
					if (!this.packageName) {
						uni.showToast({
							title: '套餐名不能为空',
							duration: 2000,
							icon: 'none'
						});
						return;
					}
					data = {
						packageName: this.packageName,
						type: 'B3',
						minMoney: this.minMoney,
						occupyMax: this.occupyMax,
						occupyRate: this.occupyRate,
						occupyFree: this.occupyFree,
						isFund: 0,
						isAutoStop: 0,
						defaultAutoStop: 0,
						steps: arr,
						remarks: this.remarks,
						lossRate: 0
					}
				} else if (this.active == 4) {

					let arr = []
					if (this.fourlist.length > 0) {
						this.fourlist.map((item, index, array) => {
							arr.push({
								'minPower': Number(item.left),
								'maxPower': Number(item.right),
								'standard': Number(item.money)
							})
						})

						var map2 = {}
						map2['minPower'] = this.smoney2
						map2['maxPower'] = this.smoney2
						map2['standard'] = Number(this.fourhat)
						arr.push(map2)

					} else {
						var map2 = {}
						map2['minPower'] = this.smoney2
						map2['maxPower'] = this.smoney2
						map2['standard'] = Number(this.fourhat)
						arr.push(map2)
					}
					if (!this.fourhat.toString()) {
						uni.showToast({
							title: '套餐金额不能为空',
							duration: 2000,
							icon: 'none'
						});
						return;
					}
					if (!this.packageName) {
						uni.showToast({
							title: '套餐名不能为空',
							duration: 2000,
							icon: 'none'
						});
						return;
					}
					let fund = 0
					if (this.checked == false) {
						fund = 0
						this.minMoney = 0
					} else if (this.checked == true) {
						fund = 1
					}
					let stop = 0
					if (this.Stopchecked == false) {
						stop = 0
					} else if (this.Stopchecked == true) {
						stop = 1
					}
					if (Number(this.first) == 0 || Number(this.second) == 0 || Number(this.third) == 0 || Number(this
							.fourth) == 0) {
						uni.showToast({
							title: '请完善临时金额设置',
							duration: 2000,
							icon: 'none'
						});
						return
					}
					if (!this.disFirst.toString() || !this.disSecond.toString() || !this.disThird.toString() || !this
						.disFourth.toString()) {
						uni.showToast({
							title: '请完善临时金额优惠率设置',
							duration: 2000,
							icon: 'none'
						});
						return
					}
					if ((this.disFirst > 0.99 && this.disFirst < 0) || (this.disSecond > 0.99 && this.disSecond < 0) || (
							this.disThird > 0.99 && this.disThird < 0) || (this.disFourth > 0.99 && this.disFourth < 0)) {
						uni.showToast({
							title: '优惠率介于0至1之间',
							duration: 2000,
							icon: 'none'
						});
						return
					}
					if (this.onecharging == 0 || this.onecharging > 60) {
						uni.showToast({
							title: '计费单位范围在1到60之间(包含60)',
							duration: 2000,
							icon: 'none'
						});
						return;
					}
					var xarr = [];
					xarr.push(Number(this.first))
					xarr.push(Number(this.second))
					xarr.push(Number(this.third))
					xarr.push(Number(this.fourth))
					if (Array.from(new Set(xarr)).length != 4) {
						uni.showToast({
							title: '不允许设置相同金额',
							duration: 2000,
							icon: 'none'
						});
						return
					}
					data = {
						packageName: this.packageName,
						type: 'B4',
						minMoney: this.minMoney,
						occupyMax: this.occupyMax,
						occupyRate: this.occupyRate,
						occupyFree: this.occupyFree,
						isFund: fund,
						isAutoStop: stop,
						defaultAutoStop: 0,
						lossRate: 0,
						steps: arr,
						remarks: this.remarks,
						first: this.first,
						second: this.second,
						third: this.third,
						fourth: this.fourth,
						disFirst: this.disFirst,
						disSecond: this.disSecond,
						disThird: this.disThird,
						disFourth: this.disFourth,
						minutes: this.onecharging
					}
				}
				if (this.active == 0) {
					if (section(this.minMoney) == true || section(this.standard) == true) {
						uni.showModal({
						    title: '提示',
						    content: '系统检测到有非正常范围内（正常为0.2-3元）的费率金额，点击“取消”进行检查，点击“确认”继续操作！',
						    success: (res2)=> {
						        if (res2.confirm) {
						            let header = {
						            	'content-type': 'application/json '
						            }
						            this.$base.request1('manager/rate' + '/' + this.projectId, 'POST', data, header)
						            	.then(res => {
						            		if (res.data.code == 200) {
						            			uni.showToast({
						            				title: '添加成功',
						            				duration: 2000,
						            			});
						            			uni.navigateBack()
						            		} else {
						            			uni.showToast({
						            				title: res.data.msg,
						            				duration: 2000,
						            				icon: 'none'
						            			});
						            			return;
						            		}
						            	})
						            	.catch(err => {
						            
						            	})
						        } else if (res2.cancel) {
						            console.log('用户点击取消');
						        }
						    }
						});
						
					} else {
						let header = {
							'content-type': 'application/json '
						}
						this.$base.request1('manager/rate' + '/' + this.projectId, 'POST', data, header)
							.then(res => {
								if (res.data.code == 200) {
									uni.showToast({
										title: '添加成功',
										duration: 2000,
									});
									uni.navigateBack()
								} else {
									uni.showToast({
										title: res.data.msg,
										duration: 2000,
										icon: 'none'
									});
									return;
								}
							})
							.catch(err => {

							})
					}
				} else if (this.active == 1) {
					if (section(this.minMoney) == true || section(this.standard) == true) {
						uni.showModal({
						    title: '提示',
						    content: '系统检测到有非正常范围内（正常为0.2-3元）的费率金额，点击“取消”进行检查，点击“确认”继续操作！',
						    success: (res2)=> {
						        if (res2.confirm) {
						            let header = {
						            	'content-type': 'application/json '
						            }
						            this.$base.request1('manager/rate' + '/' + this.projectId, 'POST', data, header)
						            	.then(res => {
						            		if (res.data.code == 200) {
												uni.showToast({
													title: '添加成功',
													duration: 2000,
												});
						            			uni.navigateBack()
						            		} else {
												uni.showToast({
													title: res.data.msg,
													duration: 2000,
													icon: 'none'
												});
						            			return;
						            		}
						            	})
						            	.catch(err => {
						            
						            	})
						        } else if (res2.cancel) {
						            console.log('用户点击取消');
						        }
						    }
						});
						
					} else {
						let header = {
							'content-type': 'application/json '
						}
						this.$base.request1('manager/rate' + '/' + this.projectId, 'POST', data, header)
							.then(res => {
								if (res.data.code == 200) {
									uni.showToast({
										title: '添加成功',
										duration: 2000,
									});
									uni.navigateBack()
								} else {
									uni.showToast({
										title: res.data.msg,
										duration: 2000,
										icon: 'none'
									});
									return;
								}
							})
							.catch(err => {

							})
					}
				} else if (this.active == 3) {
					if (section(this.minMoney) == true || section(this.threehat) == true) {
						uni.showModal({
						    title: '提示',
						    content: '系统检测到有非正常范围内（正常为0.2-3元）的费率金额，点击“取消”进行检查，点击“确认”继续操作！',
						    success: (res2)=> {
						        if (res2.confirm) {
						            let header = {
						            	'content-type': 'application/json '
						            }
						            this.$base.request1('manager/rate' + '/' + this.projectId, 'POST', data, header)
						            	.then(res => {
						            		if (res.data.code == 200) {
												uni.showToast({
													title: '添加成功',
													duration: 2000,
												});
						            			uni.navigateBack()
						            		} else {
						            			uni.showToast({
						            				title: res.data.msg,
						            				duration: 2000,
						            				icon: 'none'
						            			});
						            			return;
						            		}
						            	})
						            	.catch(err => {
						            
						            	})
						        } else if (res2.cancel) {
						            console.log('用户点击取消');
						        }
						    }
						});
						
					} else {
						let header = {
							'content-type': 'application/json '
						}
						this.$base.request1('manager/rate' + '/' + this.projectId, 'POST', data, header)
							.then(res => {
								if (res.data.code == 200) {
									uni.showToast({
										title: '添加成功',
										duration: 2000,
									});
									uni.navigateBack()
								} else {
									uni.showToast({
										title: res.data.msg,
										duration: 2000,
										icon: 'none'
									});
									return;
								}
							})
							.catch(err => {

							})
					}
				} else if (this.active == 2) {
					if (section(this.minMoney) == true || section(this.twohat) == true) {
						uni.showModal({
						    title: '提示',
						    content: '系统检测到有非正常范围内（正常为0.2-3元）的费率金额，点击“取消”进行检查，点击“确认”继续操作！',
						    success: (res2)=> {
						        if (res2.confirm) {
						            let header = {
						            	'content-type': 'application/json '
						            }
						            this.$base.request1('manager/rate' + '/' + this.projectId, 'POST', data, header)
						            	.then(res => {
						            		if (res.data.code == 200) {
												uni.showToast({
													title: '添加成功',
													duration: 2000,
												});
						            			uni.navigateBack()
						            		} else {
												uni.showToast({
													title: res.data.msg,
													duration: 2000,
													icon: 'none'
												});
						            			return;
						            		}
						            	})
						            	.catch(err => {
						            
						            	})
						        } else if (res2.cancel) {
						            console.log('用户点击取消');
						        }
						    }
						});
						
					} else {
						let header = {
							'content-type': 'application/json '
						}
						this.$base.request1('manager/rate' + '/' + this.projectId, 'POST', data, header)
							.then(res => {
								if (res.data.code == 200) {
									uni.showToast({
										title: '添加成功',
										duration: 2000,
									});
									uni.navigateBack()
								} else {
									uni.showToast({
										title: res.data.msg,
										duration: 2000,
										icon: 'none'
									});
									return;
								}
							})
							.catch(err => {

							})
					}
				} else if (this.active == 4) {
					let header = {
						'content-type': 'application/json '
					}
					this.$base.request1('manager/rate' + '/' + this.projectId, 'POST', data, header)
						.then(res => {
							if (res.data.code == 200) {
								uni.showToast({
									title: '添加成功',
									duration: 2000,
								});
								uni.navigateBack()
							} else {
								uni.showToast({
									title: res.data.msg,
									duration: 2000,
									icon: 'none'
								});
								return;
							}
						})
						.catch(err => {

						})
				}


			}
		}
	}
</script>

<style lang="scss" scoped>
	.main {
		width: 100%;
		overflow-x: hidden;

		.show {
			/deep/.van-tab {
				font-size: 32upx;
				font-family: PingFang SC Bold, PingFang SC Bold-Bold;
				font-weight: 700;
				color: #999999;
			}

			/deep/.van-tab--active {
				font-size: 32upx;
				font-family: PingFang SC Bold, PingFang SC Bold-Bold;
				font-weight: 700;
				color: #4b98ed;
			}

			/deep/.van-tabs__line {
				width: 95upx !important;
				height: 4upx;
				border-radius: 2px;
				background-color: #4B98ED;
			}

			.sone {
				width: 100%;
				box-sizing: border-box;
				padding: 0 32upx;
				margin-top: 27upx;
				border-bottom: 1upx solid #c7c7c7;
				padding-bottom: 30upx;

				input {
					// width: 100%;
					font-size: 28upx;
					font-family: PingFang SC Medium, PingFang SC Medium-Medium;
					font-weight: 500;
					text-align: center;
					color: #999999;
					border-bottom: 1upx solid #dedede;
					margin: 0 auto;
					// padding: 25upx 0;
					width: 643upx;
					height: 56upx;
					border: 1upx solid #999999;
					border-radius: 10upx;
				}
			}

			.showtap {


				.sone1 {
					width: 100%;
					box-sizing: border-box;
					padding: 0 32upx;
					margin-top: 27upx;

					input {
						// width: 100%;
						font-size: 28upx;
						font-family: PingFang SC Medium, PingFang SC Medium-Medium;
						font-weight: 500;
						text-align: center;
						color: #999999;
						border-bottom: 1upx solid #dedede;
						margin: 0 auto;
						// padding: 25upx 0;
						width: 643upx;
						height: 56upx;
						border: 1upx solid #999999;
						border-radius: 10upx;
					}
				}

				.mont {
					width: 100%;
					box-sizing: border-box;

					.monthand {
						width: 100%;
						box-sizing: border-box;
						padding: 41upx;
						padding-bottom: 0upx;
						font-size: 28upx;
						font-family: PingFang SC Bold, PingFang SC Bold-Bold;
						font-weight: 700;
						color: #333333;
					}

					.montap {
						width: 100%;
						box-sizing: border-box;
						display: flex;
						justify-content: space-between;
						flex-wrap: wrap;
						padding: 0 56upx;

						.mtwo {
							display: flex;
							align-items: center;

							.mtwotxt {
								font-size: 28upx;
								font-family: PingFang SC Medium, PingFang SC Medium-Medium;
								font-weight: 500;
								margin-top: 36upx;
								margin-left: 10upx;
							}

							input {
								font-size: 28upx;
								font-family: PingFang SC Medium, PingFang SC Medium-Medium;
								font-weight: 500;
								text-align: center;
								color: #999999;
								margin-top: 32upx;
								width: 255upx;
								height: 56upx;
								border: 1upx solid #999999;
								border-radius: 10upx;
							}
						}

					}
				}

				.stap {
					width: 100%;
					box-sizing: border-box;
					padding: 0 32upx;

					.staptxt {
						font-size: 28upx;
						font-family: PingFang SC Bold, PingFang SC Bold-Bold;
						font-weight: 700;
						color: #333333;
						margin-top: 40upx;
					}

					.stapsix {
						width: 258upx;
						height: 64upx;
						border: 2upx solid #4b98ed;
						border-radius: 8upx;
						font-size: 24upx;
						font-family: PingFang SC Medium, PingFang SC Medium-Medium;
						font-weight: 500;
						text-align: center;
						line-height: 64upx;
						color: #4b98ed;
						margin: 0 auto;
						// margin-top: 84upx;
					}

					.stapone {
						width: 100%;
						margin-top: 40upx;
						display: flex;
						align-items: center;

						.staponeleft {
							font-size: 24upx;
							font-family: PingFang SC Bold, PingFang SC Bold-Bold;
							font-weight: 700;
							text-align: left;
							color: #333333;
							width: 35%;
							// margin-top: 15upx;
						}

						.staponelefts {
							font-size: 24upx;
							font-family: PingFang SC Bold, PingFang SC Bold-Bold;
							font-weight: 700;
							color: #333333;
							width: 25%;
							margin-left: 20upx;
							// margin-top: 15upx;
						}

						input {
							font-size: 28upx;
							font-family: PingFang SC Medium, PingFang SC Medium-Medium;
							font-weight: 500;
							text-align: center;
							color: #999999;
							width: 372upx;
							height: 56upx;
							border: 1upx solid #999999;
							border-radius: 10upx;
						}
					}

					.stapone1 {
						width: 100%;
						border-bottom: 1upx solid #e8e8e8;
						margin-top: 40upx;
						display: flex;
						// justify-content: space-between;
						align-items: center;

						.stapone1left {
							font-size: 24upx;
							font-family: PingFang SC Bold, PingFang SC Bold-Bold;
							font-weight: 700;
							color: #333333;
							width: 40%;
						}

						.stapone1z {
							font-size: 28upx;
							font-family: PingFang SC Medium, PingFang SC Medium-Medium;
							font-weight: 500;
							color: #333333;
							width: 50%;
						}

						.stapone1right {
							font-size: 24upx;
							font-family: PingFang SC Regular, PingFang SC Regular-Regular;
							font-weight: 400;
							color: #666666;
						}

					}

					.sfant {
						margin: 30upx 0;

						/deep/.van-checkbox__label {
							font-size: 28upx;
							font-family: PingFang SC Bold, PingFang SC Bold-Bold;
							font-weight: 700;
							color: #333333;
						}
					}

					.staptwo {
						width: 100%;

						.staptwohand {
							font-size: 24upx;
							font-family: PingFang SC Bold, PingFang SC Bold-Bold;
							font-weight: 700;
							text-align: left;
							color: #333333;
							margin-top: 58upx;
						}

						textarea {
							width: 100%;
							height: 243upx;
							border-radius: 16upx;
							box-sizing: border-box;
							background-color: #E5E5E5;
							padding: 32upx;
							margin-top: 23upx;
						}
					}

					.stapthree {
						width: 100%;
						display: flex;
						justify-content: space-between;
						margin-top: 66upx;

						.stapthreezhong {
							width: 686upx;
							height: 88upx;
							border-radius: 8upx;
							background-color: #4B98ED;
							font-size: 32upx;
							font-family: PingFang SC Bold, PingFang SC Bold-Bold;
							font-weight: 700;
							text-align: center;
							line-height: 88upx;
							color: #ffffff;
						}

						.stapthreeleft {
							width: 333upx;
							height: 88upx;
							border-radius: 8upx;
							background-color: #4B98ED;
							font-size: 32upx;
							font-family: PingFang SC Bold, PingFang SC Bold-Bold;
							font-weight: 700;
							text-align: center;
							line-height: 88upx;
							color: #ffffff;
						}

						.stapthreeright {
							width: 333upx;
							height: 88upx;
							border-radius: 8upx;
							background-color: #D2D2D2;
							font-size: 32upx;
							font-family: PingFang SC Bold, PingFang SC Bold-Bold;
							font-weight: 700;
							text-align: center;
							line-height: 88upx;
							color: #ffffff;
						}
					}

					.stapfour {
						width: 100%;

						.stapfourhand {
							width: 100%;
							text-align: center;
							margin-top: 20upx;

							image {
								width: 22upx;
								height: 13upx;
							}
						}

						.stapfourfoot {
							margin-top: 10upx;
							width: 100%;
							font-size: 24upx;
							font-family: PingFang SC Regular, PingFang SC Regular-Regular;
							font-weight: 400;
							text-align: center;
							color: #333333;
						}
					}

					.stapfive {
						width: 100%;
						line-height: 40upx;

						.stapfivehand {
							font-size: 24upx;
							font-family: PingFang SC Bold, PingFang SC Bold-Bold;
							font-weight: 700;
							color: #333333;
						}

						.stapfivefoot {
							font-size: 24upx;
							font-family: PingFang SC Bold, PingFang SC Bold-Bold;
							font-weight: 500;
							color: #333333;
						}
					}

					.stapseven1 {
						width: 100%;
						display: flex;
						align-items: center;
						margin: 30upx 0;

						.stapsevenleft {
							font-size: 24upx;
							font-family: PingFang SC Bold, PingFang SC Bold-Bold;
							font-weight: 700;
							color: #333333;
							width: 30%;
						}

						.stapsevenleft1 {
							font-size: 24upx;
							font-family: PingFang SC Bold, PingFang SC Bold-Bold;
							font-weight: 700;
							color: #333333;
							margin-left: 10upx;
						}

						input {
							font-size: 28upx;
							font-family: PingFang SC Medium, PingFang SC Medium-Medium;
							font-weight: 500;
							color: #999999;
							width: 372upx;
							height: 56upx;
							border: 1upx solid #999999;
							border-radius: 10upx;
							text-align: center;
						}
					}

					.stapseven {
						width: 100%;
						display: flex;
						align-items: center;

						.stapsevenleft {
							font-size: 24upx;
							font-family: PingFang SC Bold, PingFang SC Bold-Bold;
							font-weight: 700;
							color: #333333;
							width: 30%;
						}

						.stapsevenleft1 {
							font-size: 24upx;
							font-family: PingFang SC Bold, PingFang SC Bold-Bold;
							font-weight: 700;
							color: #333333;
							margin-left: 10upx;
						}

						input {
							font-size: 28upx;
							font-family: PingFang SC Medium, PingFang SC Medium-Medium;
							font-weight: 500;
							color: #999999;
							width: 372upx;
							height: 56upx;
							border: 1upx solid #999999;
							border-radius: 10upx;
							text-align: center;
						}
					}
				}

			}

			.stap {
				width: 100%;
				box-sizing: border-box;
				padding: 0 32upx;

				.stapone {
					width: 100%;
					margin-top: 40upx;
					display: flex;
					align-items: center;

					.staponeleft {
						font-size: 24upx;
						font-family: PingFang SC Bold, PingFang SC Bold-Bold;
						font-weight: 700;
						text-align: left;
						color: #333333;
						width: 35%;
						// margin-top: 15upx;
					}

					.staponelefts {
						font-size: 24upx;
						font-family: PingFang SC Bold, PingFang SC Bold-Bold;
						font-weight: 700;
						color: #333333;
						width: 25%;
						margin-left: 20upx;
						// margin-top: 15upx;
					}

					input {
						font-size: 28upx;
						font-family: PingFang SC Medium, PingFang SC Medium-Medium;
						font-weight: 500;
						text-align: center;
						color: #999999;
						width: 372upx;
						height: 56upx;
						border: 1upx solid #999999;
						border-radius: 10upx;
					}
				}

				.stapone1 {
					width: 100%;
					border-bottom: 1upx solid #e8e8e8;
					margin-top: 40upx;
					display: flex;
					// justify-content: space-between;
					align-items: center;

					.stapone1left {
						width: 40%;
						font-size: 24upx;
						font-family: PingFang SC Bold, PingFang SC Bold-Bold;
						font-weight: 700;
						color: #333333;
					}

					.stapone1z {
						font-size: 28upx;
						font-family: PingFang SC Medium, PingFang SC Medium-Medium;
						font-weight: 500;
						color: #333333;
						width: 50%;
					}

					.stapone1right {
						font-size: 24upx;
						font-family: PingFang SC Regular, PingFang SC Regular-Regular;
						font-weight: 400;
						color: #666666;
					}

				}

				.staptwo {
					width: 100%;

					.staptwohand {
						font-size: 24upx;
						font-family: PingFang SC Bold, PingFang SC Bold-Bold;
						font-weight: 700;
						text-align: left;
						color: #333333;
						margin-top: 58upx;
					}

					textarea {
						width: 100%;
						height: 243upx;
						border-radius: 16upx;
						box-sizing: border-box;
						background-color: #E5E5E5;
						padding: 32upx;
						margin-top: 23upx;
					}
				}

				.stapthree {
					width: 100%;
					display: flex;
					justify-content: space-between;
					margin-top: 66upx;

					.stapthreezhong {
						width: 686upx;
						height: 88upx;
						border-radius: 8upx;
						background-color: #4B98ED;
						font-size: 32upx;
						font-family: PingFang SC Bold, PingFang SC Bold-Bold;
						font-weight: 700;
						text-align: center;
						line-height: 88upx;
						color: #ffffff;
					}

					.stapthreeleft {
						width: 333upx;
						height: 88upx;
						border-radius: 8upx;
						background-color: #4B98ED;
						font-size: 32upx;
						font-family: PingFang SC Bold, PingFang SC Bold-Bold;
						font-weight: 700;
						text-align: center;
						line-height: 88upx;
						color: #ffffff;
					}

					.stapthreeright {
						width: 333upx;
						height: 88upx;
						border-radius: 8upx;
						background-color: #D2D2D2;
						font-size: 32upx;
						font-family: PingFang SC Bold, PingFang SC Bold-Bold;
						font-weight: 700;
						text-align: center;
						line-height: 88upx;
						color: #ffffff;
					}
				}

				.stapfour {
					width: 100%;

					.stapfourhand {
						width: 100%;
						text-align: center;
						margin-top: 20upx;

						image {
							width: 22upx;
							height: 13upx;
						}
					}

					.stapfourfoot {
						margin-top: 10upx;
						width: 100%;
						font-size: 24upx;
						font-family: PingFang SC Regular, PingFang SC Regular-Regular;
						font-weight: 400;
						text-align: center;
						color: #333333;
					}
				}

				.stapfive {
					width: 100%;
					line-height: 40upx;

					.stapfivehand {
						font-size: 24upx;
						font-family: PingFang SC Bold, PingFang SC Bold-Bold;
						font-weight: 700;
						color: #333333;
					}

					.stapfivefoot {
						font-size: 24upx;
						font-family: PingFang SC Bold, PingFang SC Bold-Bold;
						font-weight: 500;
						color: #333333;
					}
				}

				.staphat {
					display: flex;
					font-size: 26px;
					font-family: PingFang SC Bold, PingFang SC Bold-Bold;
					font-weight: 700;
					color: #333333;

					input: {
						font-size: 30px;
						font-family: PingFang SC Medium, PingFang SC Medium-Medium;
						font-weight: 500;
						color: #333333;
					}
				}

				.stapsix {
					width: 258upx;
					height: 64upx;
					border: 2upx solid #4b98ed;
					border-radius: 8upx;
					font-size: 24upx;
					font-family: PingFang SC Medium, PingFang SC Medium-Medium;
					font-weight: 500;
					text-align: center;
					line-height: 64upx;
					color: #4b98ed;
					margin: 30upx auto;
				}

				.stapseven1 {
					width: 100%;
					display: flex;
					align-items: center;
					margin: 30upx 0;

					.stapsevenleft {
						font-size: 24upx;
						font-family: PingFang SC Bold, PingFang SC Bold-Bold;
						font-weight: 700;
						color: #333333;
						width: 21%;
					}

					.stapsevenleft1 {
						font-size: 24upx;
						font-family: PingFang SC Bold, PingFang SC Bold-Bold;
						font-weight: 700;
						color: #333333;
						margin-left: 20upx;
					}

					input {
						font-size: 28upx;
						font-family: PingFang SC Medium, PingFang SC Medium-Medium;
						font-weight: 500;
						color: #999999;
						width: 372upx;
						height: 56upx;
						text-align: center;
						border: 1upx solid #999999;
						border-radius: 10upx;
					}
				}

				.stapseven {
					width: 100%;
					display: flex;
					align-items: center;

					.stapsevenleft {
						font-size: 24upx;
						font-family: PingFang SC Bold, PingFang SC Bold-Bold;
						font-weight: 700;
						color: #333333;
						width: 21%;
					}

					.stapsevenleft1 {
						font-size: 24upx;
						font-family: PingFang SC Bold, PingFang SC Bold-Bold;
						font-weight: 700;
						color: #333333;
						margin-left: 20upx;
					}

					input {
						font-size: 28upx;
						font-family: PingFang SC Medium, PingFang SC Medium-Medium;
						font-weight: 500;
						color: #999999;
						width: 372upx;
						height: 56upx;
						border: 1upx solid #999999;
						border-radius: 10upx;
						text-align: center;
					}
				}
			}
		}

		/deep/.van-popup--center {
			border-radius: 16upx;
		}

		.tan {
			width: 636upx;
			height: 465upx;
			border-radius: 16upx;
			background-color: #FFFFFF;
			box-sizing: border-box;

			.tanhand {
				font-size: 32upx;
				font-family: PingFang SC Bold, PingFang SC Bold-Bold;
				font-weight: 700;
				text-align: center;
				color: #333333;
				margin-top: 40upx;
			}

			.tanone {
				width: 100%;
				display: flex;
				justify-content: center;
				align-items: center;
				margin-top: 62upx;

				.tantxt {
					font-size: 28upx;
					font-family: PingFang SC Medium, PingFang SC Medium-Medium;
					font-weight: 500;
					margin-left: 9upx;
				}

				input {
					box-sizing: border-box;
					font-size: 28upx;
					font-family: PingFang SC Medium, PingFang SC Medium-Medium;
					font-weight: 500;
					color: #999999;
					width: 157upx;
					height: 56upx;
					border: 1upx solid #999999;
					border-radius: 10upx;
					text-align: center;
				}

				.tanonetap {
					width: 60upx;
					height: 1px;
					background-color: #dddddd;
					margin: 0 40upx;
				}
			}

			.tantwo {
				width: 189upx;
				margin: 0 auto;
				margin-top: 40upx;
				display: flex;

				.tantxt {
					font-size: 28upx;
					font-family: PingFang SC Medium, PingFang SC Medium-Medium;
					font-weight: 500;
					margin-left: 9upx;
					margin-top: 10upx;
				}

				input {
					box-sizing: border-box;
					text-align: center;
					font-size: 28upx;
					font-family: PingFang SC Medium, PingFang SC Medium-Medium;
					font-weight: 500;
					color: #999999;
					width: 157upx;
					height: 56upx;
					border: 1upx solid #999999;
					border-radius: 10upx;
				}
			}

			.tanbtn {
				width: 100%;
				display: flex;
				justify-content: center;
				margin-top: 87upx;

				.tanbtnleft {
					width: 191upx;
					height: 60upx;
					border-radius: 8upx;
					font-size: 28upx;
					font-family: PingFang SC Medium, PingFang SC Medium-Medium;
					font-weight: 500;
					text-align: center;
					line-height: 60upx;
					color: #ffffff;
					margin-right: 61upx;
					color: #333333;
					border: 1upx solid #333333;
				}

				.tanbtnright {
					width: 191upx;
					height: 64upx;
					border-radius: 8upx;
					background-color: #4B98ED;
					font-size: 28upx;
					font-family: PingFang SC Medium, PingFang SC Medium-Medium;
					font-weight: 500;
					text-align: center;
					line-height: 64upx;
					color: #ffffff;
				}
			}
		}

	}
</style>